package com.openlogic.logic.service.logic.impl;

import java.util.List;

import org.noear.solon.annotation.Component;

import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.solon.service.impl.ServiceImpl;
import com.openlogic.api.logic.entity.RuleModelNodeMerge;
import com.openlogic.api.logic.entity.table.Tables;
import com.openlogic.logic.mapper.logic.RuleModelNodeMergeMapper;
import com.openlogic.logic.service.logic.RuleModelNodeMergeService;

/**
* @ClassName: RuleModelNodeMergeServiceImpl
* @Description: 规则参数与节点关联管理 服务层处理
* @author weiyongpeng
* @date 2024年9月16日 上午9:01:56
 */
@Component
public class RuleModelNodeMergeServiceImpl extends ServiceImpl<RuleModelNodeMergeMapper,RuleModelNodeMerge> implements RuleModelNodeMergeService {


	@Override
	public void deleteByRuleKey(String id) {
		removeById(id);
	}

	@Override
	public void deleteByNodeId(String nodeId) {
		remove(QueryWrapper.create().where(Tables.ruleModelNodeMerge.nodeId.eq(nodeId)));
	}
	
	@Override
	public boolean insertBatch(List<RuleModelNodeMerge> ruleModelNodeMergeDtos) {
		return saveBatch(ruleModelNodeMergeDtos);
	}

}